// 装备保养
import request from "@/api/request";

// 分页查询所有装备
export const query_zb = (params) => {
  return request({
    url: "/equipmanage/preserve/selectAll",
    method: "post",
    data: params,
  });
};

//   删除
export const delete_zb = (params) => {
  return request({
    url: "/equipmanage/preserve/delete/" + params,
    method: "post",
  });
};

// 新增
export const add_zb = (params) => {
  return request({
    url: "/equipmanage/preserve/insert",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

//  修改
export const update_zb = (params) => {
  return request({
    url: "/equipmanage/preserve/update",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

//   查找详情
export const detials_zb = (params) => {
  return request({
    url: "/equipmanage/preserve/selectDetails/" + params,
    method: "post",
  });
};

// 用户列表
export const userList_zb = (params) => {
  return request({
    url: "/equipmanage/preserve/userList/" + params,
    method: "post",
  });
};

// 机构列表
export const orgList_zb = () => {
  return request({
    url: "/equipmanage/preserve/orgList",
    method: "post",
  });
};

// 保障机构列表
export const proOrgList_zb = () => {
  return request({
    url: "/equipmanage/preserve/proOrgList",
    method: "post",
  });
};

// 装备编号
export const equipList_zb = () => {
  return request({
    url: "/equipmanage/scrap/equipList",
    method: "post",
  });
};
// 单位
export const unitList_zb = (params) => {
  return request({
    url: "/equipmanage/scrap/unitList",
    method: "post",
    data: params,
  });
};

// 提交
export const submit_zb = (params) => {
  return request({
    url: "/equipmanage/preserve/commit",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

//   审核
export const audit_zb = (params) => {
  return request({
    url: "/equipmanage/preserve/audit",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

//   审核历史
export const history_zb = (params) => {
  return request({
    url: "/equipmanage/preserve/getAuditHistory",
    method: "post",
    data: params,
  });
};

//   回退
export const undo_zb = (params) => {
  return request({
    url: "/equipmanage/preserve/undo",
    method: "post",
    data: params,
  });
};

//   作废单据
export const cancel_zb = (params) => {
  return request({
    url: "/equipmanage/preserve/cancel",
    method: "post",
    data: params,
  });
};

// 上传附件
// export const upload_scrap = (params) => {
//   return request({
//     url: "/equipmanage/eadc/eadc/upload",
//     method: "post",
//     data: params,
//     // headers: { "Content-Type": "application/json;charset=UTF-8" },
//   });
// };

// 经费类别
export const expenditure_type = (params) => {
  return request({
    url: "/equipmanage/preserve/fundCategoryList",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 分页查询经费类别
export const query_expenditureType = (params) => {
  return request({
    url: "/equipmanage/preserve/fundInfoList",
    method: "post",
    data: params,
  });
};

// 来源单号列表
export const query_orderNumberList = (params) => {
  return request({
    url: "/equipmanage/preserve/orderNumberList/" + params,
    method: "post",
    data: params,
  });
};

// 保养等级
export const upkeep_grade = (params) => {
  return request({
    url: "/equipmanage/preserve/preserveLevelList",
    method: "post",
    data: params,
  });
};
